import Cookies from 'js-cookie';

const TokenKey = 'hrsaas-ihrm-token';

// 定义一个时间戳
const timeStamp = 'hrsaas-timeStamp-key';

export function getToken() {
  return Cookies.get(TokenKey);
}

export function setToken(token) {
  return Cookies.set(TokenKey, token);
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}

// 存入时间戳
export function setTimeStamp() {
  return Cookies.set(timeStamp, Date.now());
}

// 获取时间戳
export function getTimeStamp() {
  return Cookies.get(timeStamp);
}
